var sessionid =  sessionStorage.getItem("sessionid");
$(function () {

	var sessionid = window.location.href.split("?")[1].split("&")[1].split("=")[1];
	console.log(sessionid)

	var issueId = window.location.href.split("?")[1].split("=")[1].split("&")[0];//这是什么
	console.log(issueId)

	$(".reviewed_btn").click(function(){
		console.log($('#commentText').val())
		$.ajax({
			type:'POST',
			url:'https://www.bjdeshangyuan.com/book/api/issue/comment?sessionid='+sessionid,
			data:{
				sessionid:sessionid,
				issueId:issueId,
				commentText:$('#commentText').val()
			},
			success:function(data){
				console.log(data);
			}
		})
	})




	/* 返回上一级页面 */
	$("#back").click(function(){
		window.history.back();
	})

	/* 跳转页面 */
	$(".reviewed_btn").click(function() {
		window.location.href="problem_details.html?issueId="+issueId+"&sessionid="+sessionid;
	})

})